Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Experimental basic plugin support to allow the app and themes to extend the functionality of vuepress. It attempts to load
themeDir/index.js
then.vuepress/index.js
and gives them access to the options at the end of the prepare method. Plugins can then use this to write extra files such as to write a_redirects
file to support redirects in netlify:This can also be used for RSS feeds, sitemaps and anything else that needs to be dynamically written based on the posts or config data.
This also allows plugins to modify the options data to inject extra values or config like markdown-it plugins of header metadata.
This currently conflicts with pull request #154 as they both use
themeDir/index.js
for different purposes. I think it is better to use the index.js for plugins and rename the file in #154 but we could also use an alternative file likeplugin.js
(or just drop the pull request as it should be possible to load server side components via the plugin).